import * as echarts from 'echarts'
import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/reset.css';
import './static/common.css';
import './assets/iconfont/iconfont.js';
import './assets/iconfont/iconfont.css';

import "vue3-emoji/dist/style.css";

import VueMarkdownEditor from '@kangc/v-md-editor';
import '@kangc/v-md-editor/lib/style/base-editor.css';
import vuepressTheme from '@kangc/v-md-editor/lib/theme/vuepress.js';
import '@kangc/v-md-editor/lib/theme/style/vuepress.css';
import Prism from 'prismjs';
// 这是预览时引用的
import VMdPreview from '@kangc/v-md-editor/lib/preview';
import '@kangc/v-md-editor/lib/style/preview.css';
// 引入你所使用的主题 此处以 github 主题为例
import githubTheme from '@kangc/v-md-editor/lib/theme/github';
import '@kangc/v-md-editor/lib/theme/style/github.css';

import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router/index.js'

// highlightjs
import hljs from 'highlight.js';
//预览的主题
VMdPreview.use(githubTheme, {
    Hljs: hljs,
});
//编辑器的主题
VueMarkdownEditor.use(vuepressTheme, {
    Prism,
});

const app = createApp(App)

app.config.globalProperties.$echarts = echarts
app.use(createPinia())
app.use(router)
app.use(Antd)
//注册
app.use(VMdPreview);
app.use(VueMarkdownEditor);

app.mount('#app')